import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:panda/base/Constant.dart';

class MySccorePage extends StatefulWidget {
  MySccorePage({Key key}) : super(key: key);

  @override
  _MySccorePageState createState() => _MySccorePageState();
}

class _MySccorePageState extends State<MySccorePage> {
  @override
  Widget build(BuildContext context) {
    return new Scaffold(
        appBar: new AppBar(
          title: new Text(
            "我的积分",
            style: TextStyle(
                fontSize: ScreenUtil.getInstance().setSp(BIG_FONT_SIZE),
                color: Colors.black),
          ),
          elevation: 0.2,
          backgroundColor: Colors.white,
          brightness: Brightness.light,
          centerTitle: true,
          iconTheme: new IconThemeData(color: Colors.black),
        ),
        backgroundColor: white,
        body: new Column(
          children: <Widget>[
            Container(
              width: double.infinity,
              padding:
                  EdgeInsets.all(ScreenUtil.getInstance().setHeight(DP_60)),
              child: new Column(
                children: <Widget>[
                  Text('27',
                      style: TextStyle(
                          color: black,
                          fontSize: ScreenUtil.getInstance()
                              .setSp(BIG_FONT_SIZE * 2))),
                  Text('总积分',
                      style: TextStyle(
                          color: black_99,
                          fontSize:
                              ScreenUtil.getInstance().setSp(NORMAL_FONT_SIZE)))
                ],
              ),
            ),
            Container(
              height: 2,
              color: f0Color,
              width: double.infinity,
            ),
            Row(
              children: <Widget>[
                Expanded(
                  child: Container(
                    width: double.infinity,
                    padding: EdgeInsets.all(
                        ScreenUtil.getInstance().setHeight(DP_30)),
                    child: new Column(
                      children: <Widget>[
                        Text('27',
                            style: TextStyle(
                                color: black,
                                fontSize: ScreenUtil.getInstance()
                                    .setSp(BIG_FONT_SIZE))),
                        Container(
                          height: 10,
                        ),
                        Text('当前可用积分',
                            style: TextStyle(
                                color: black_99,
                                fontSize: ScreenUtil.getInstance()
                                    .setSp(SMALL_FONT_SIZE)))
                      ],
                    ),
                  ),
                ),
                Container(
                  height: ScreenUtil.getInstance().setHeight(DP_80),
                  width: 1,
                  color: f0Color,
                ),
                Expanded(
                  child: Container(
                    width: double.infinity,
                    padding: EdgeInsets.all(
                        ScreenUtil.getInstance().setHeight(DP_30)),
                    child: new Column(
                      children: <Widget>[
                        Text('27',
                            style: TextStyle(
                                color: black,
                                fontSize: ScreenUtil.getInstance()
                                    .setSp(BIG_FONT_SIZE))),
                        Container(
                          height: 10,
                        ),
                        Text('不可用积分',
                            style: TextStyle(
                                color: black_99,
                                fontSize: ScreenUtil.getInstance()
                                    .setSp(SMALL_FONT_SIZE)))
                      ],
                    ),
                  ),
                )
              ],
            ),
            Container(
              height: ScreenUtil.getInstance().setHeight(DP_15),
              color: f0Color,
              width: double.infinity,
            ),
            Padding(
                child: Row(
                  children: <Widget>[
                    Image.asset(
                      "images/icon_integral.png",
                      scale: 1.3,
                    ),
                    Container(
                      width: 10,
                    ),
                    Expanded(
                      child: Text('每日积分',
                          style: TextStyle(
                              color: black,
                              fontSize: ScreenUtil.getInstance()
                                  .setSp(NORMAL_FONT_SIZE))),
                    ),
                    Container(
                      padding: EdgeInsets.fromLTRB(
                          ScreenUtil.getInstance().setHeight(DP_10), 0, 0, 0),
                      decoration: BoxDecoration(
                          borderRadius: BorderRadius.circular(4),
                          border: Border.all(color: mainColor, width: 1)),
                      child: Row(
                        children: <Widget>[
                          Text('2020-01-02',
                              style: TextStyle(
                                  color: mainColor,
                                  fontSize: ScreenUtil.getInstance()
                                      .setSp(SMALL_FONT_SIZE))),
                          Icon(Icons.arrow_drop_down, color: mainColor)
                        ],
                      ),
                    )
                  ],
                ),
                padding:
                    EdgeInsets.all(ScreenUtil.getInstance().setHeight(DP_20))),
            Row(
              children: <Widget>[
                Expanded(
                  child: Container(
                    width: double.infinity,
                    padding: EdgeInsets.all(
                        ScreenUtil.getInstance().setHeight(DP_30)),
                    child: new Column(
                      children: <Widget>[
                        Text('27',
                            style: TextStyle(
                                color: black,
                                fontSize: ScreenUtil.getInstance()
                                    .setSp(BIG_FONT_SIZE))),
                        Container(
                          height: 10,
                        ),
                        Text('获得积分',
                            style: TextStyle(
                                color: black_99,
                                fontSize: ScreenUtil.getInstance()
                                    .setSp(SMALL_FONT_SIZE)))
                      ],
                    ),
                  ),
                ),
                Expanded(
                  child: Container(
                    width: double.infinity,
                    padding: EdgeInsets.all(
                        ScreenUtil.getInstance().setHeight(DP_30)),
                    child: new Column(
                      children: <Widget>[
                        Text('27',
                            style: TextStyle(
                                color: black,
                                fontSize: ScreenUtil.getInstance()
                                    .setSp(BIG_FONT_SIZE))),
                        Container(
                          height: 10,
                        ),
                        Text('已使用积分',
                            style: TextStyle(
                                color: black_99,
                                fontSize: ScreenUtil.getInstance()
                                    .setSp(SMALL_FONT_SIZE)))
                      ],
                    ),
                  ),
                )
              ],
            ),
            Container(
              height: ScreenUtil.getInstance().setHeight(DP_15),
              color: f0Color,
              width: double.infinity,
            ),
            Padding(
                child: Row(
                  children: <Widget>[
                    Image.asset(
                      "images/icon_integral.png",
                      scale: 1.3,
                    ),
                    Container(
                      width: 10,
                    ),
                    Expanded(
                      child: Text('每月积分',
                          style: TextStyle(
                              color: black,
                              fontSize: ScreenUtil.getInstance()
                                  .setSp(NORMAL_FONT_SIZE))),
                    ),
                    Container(
                      padding: EdgeInsets.fromLTRB(
                          ScreenUtil.getInstance().setHeight(DP_10), 0, 0, 0),
                      decoration: BoxDecoration(
                          borderRadius: BorderRadius.circular(4),
                          border: Border.all(color: mainColor, width: 1)),
                      child: Row(
                        children: <Widget>[
                          Text('2020-01',
                              style: TextStyle(
                                  color: mainColor,
                                  fontSize: ScreenUtil.getInstance()
                                      .setSp(SMALL_FONT_SIZE))),
                          Icon(Icons.arrow_drop_down, color: mainColor)
                        ],
                      ),
                    )
                  ],
                ),
                padding:
                    EdgeInsets.all(ScreenUtil.getInstance().setHeight(DP_20))),
            Row(
              children: <Widget>[
                Expanded(
                  child: Container(
                    width: double.infinity,
                    padding: EdgeInsets.all(
                        ScreenUtil.getInstance().setHeight(DP_30)),
                    child: new Column(
                      children: <Widget>[
                        Text('27',
                            style: TextStyle(
                                color: black,
                                fontSize: ScreenUtil.getInstance()
                                    .setSp(BIG_FONT_SIZE))),
                        Container(
                          height: 10,
                        ),
                        Text('获得积分',
                            style: TextStyle(
                                color: black_99,
                                fontSize: ScreenUtil.getInstance()
                                    .setSp(SMALL_FONT_SIZE)))
                      ],
                    ),
                  ),
                ),
                Expanded(
                  child: Container(
                    width: double.infinity,
                    padding: EdgeInsets.all(
                        ScreenUtil.getInstance().setHeight(DP_30)),
                    child: new Column(
                      children: <Widget>[
                        Text('27',
                            style: TextStyle(
                                color: black,
                                fontSize: ScreenUtil.getInstance()
                                    .setSp(BIG_FONT_SIZE))),
                        Container(
                          height: 10,
                        ),
                        Text('已使用积分',
                            style: TextStyle(
                                color: black_99,
                                fontSize: ScreenUtil.getInstance()
                                    .setSp(SMALL_FONT_SIZE)))
                      ],
                    ),
                  ),
                )
              ],
            ),
            Container(
              height: ScreenUtil.getInstance().setHeight(DP_15),
              color: f0Color,
              width: double.infinity,
            ),
             Expanded(
              child: Center(),
            ),
            new Container(
              width: double.infinity,
              margin: EdgeInsets.all(ScreenUtil.getInstance().setHeight(DP_40)),
              height: ScreenUtil.getInstance().setHeight(DP_60),
              decoration: new BoxDecoration(
                  color: mainColor, borderRadius: BorderRadius.circular(5.0)),
              child: new FlatButton(
                child: new Padding(
                  padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
                  child: new Text(
                    "明细纪录",
                    style: new TextStyle(
                        color: Colors.white,
                        fontSize:
                            ScreenUtil.getInstance().setSp(NORMAL_FONT_SIZE)),
                  ),
                ),
                onPressed: () {},
              ),
            )
          ],
        ));
  }
}
